@import "../base/var";
@import "../base/mixins";

//colors
$white: #fff;
$black_6: rgba(0, 0, 0, 0.06);
$color_chicago_approx: #595959;
$color_shark_approx: #262626;
$color_stack_approx: #8c8c8c;
$color_christi_approx: #52c41a;
$color_chateau_green_approx: #25b864;
$color_gray_nurse_approx: #e8e8e8;
$color_silver_approx: #bfbfbf;
$alabaster: #fafafa;
$color_mountain_mist_approx: #999;

//@extend-elements
//original selectors
//.header-crumb .book-title, .header-crumb .doc-title
%extend_1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 245px;
}

.header {
  position: relative;
  z-index: 999;
  width: 100%;
  height: 60px;
  background: $white;
  //Instead of the line below you could use @include box-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)
  box-shadow: 0 1px 2px 0 $black_6;

  .header-search {
    height: 100%;
    display: flex;
    align-items: center;
    > div {
      margin-right: 24px;
      width: 200px;
    }
  }
  .header-nav-menu {
    max-width: calc(100% - 650px);
    > .ant-menu {
      width: 100%;
      display: flex;
      align-items: center;
    }
  }
  .dashboard-nav {
    margin-left: 30px;
    .menu-item {
      margin: 0 15px;
    }
  }
  .logo {
    float: left;
    height: 100%;
    display: flex;
    align-items: center;
  }
  .header-nav-item.header-nav-orgs {
    display: inline-block;
    line-height: 56px;
    padding: 0 16px;
    color: $color_chicago_approx;
  }
}

.header-nav {
  display: flex;
  align-items: center;
  height: 100%;
  .ant-menu.ant-menu-horizontal {
    border-bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    .ant-menu-item {
      top: 0;
      border-bottom: 2px solid rgba(0, 0, 0, 0);
      border-top: 3px solid rgba(0, 0, 0, 0);
      padding: 0;
      a {
        line-height: 56px;
        padding: 0 14px;
        &:hover {
          color: $color_shark_approx;
        }
      }
      &.ant-menu-item-selected a {
        color: $color_shark_approx;
        font-weight: 700;
      }
    }
  }
}
.header-nav-left {
  float: left;
}
.header-nav-right {
  float: right;
}
.header-nav-list {
  display: flex;
  align-items: center;
}
.header-nav-enter {
  margin-left: 16px;
}
.header-nav-item {
  padding: 0 10px;
  color: $color_chicago_approx;
  line-height: 32px;
  &.header-nav-item-link {
    line-height: 24px;
  }
  a {
    position: relative;
    font-size: 14px;
    color: $color_chicago_approx;
    display: block;
    &.active {
      color: $color_shark_approx;
    }
    &:hover {
      color: $color_stack_approx;
    }
  }
}
.header-back {
  width: 60px;
  height: 60px;
  float: left;
  text-align: center;
  line-height: 60px;
  font-size: 16px;
  color: $color_chicago_approx;
  border-right: 1px solid $color_gray_nurse_approx;
  &:hover {
    color: $color_stack_approx;
  }
}
.header-crumb {
  float: left;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  line-height: 32px;
  .lark-logo {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 32px;
    padding-right: 4px;
    img {
      display: block;
      width: 32px;
    }
  }
  .split {
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
    color: $color_stack_approx;
    font-size: 14px;
    display: inline-block;
    vertical-align: middle;
    + a {
      display: inline-block;
      vertical-align: middle;
    }
  }
  .text {
    color: $color_shark_approx;
  }
  a {
    color: $color_chicago_approx;
    &:hover {
      color: $color_stack_approx;
    }
  }
  .back {
    color: $color_chicago_approx;
    font-weight: 400;
    cursor: pointer;
    &:hover {
      color: $color_stack_approx;
    }
  }
  .book-title {
    @extend %extend_1;
  }
  .doc-title {
    @extend %extend_1;
    font-weight: 700;
    color: $color_shark_approx;
  }
  .larkicon-lock {
    margin-left: 6px;
    //Instead of the line below you could use @include transform($scale, $rotate, $transx, $transy, $skewx, $skewy, $originx, $originy)
    transform: scale(0.9);
    vertical-align: middle;
    font-size: 12px;
    color: $color_stack_approx;
  }
  .editor-prompt {
    margin-left: 20px;
    font-size: 12px;
    > span {
      color: $color_chicago_approx;
      font-weight: 400;
      line-height: 32px;
      cursor: pointer;
      opacity: 0;
      //Instead of the line below you could use @include transition($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10)
      transition: all 0.3s ease;
    }
  }
  .editor-prompt-active > span {
    opacity: 1;
    &:hover {
      color: $color_stack_approx;
    }
  }
}
.header-crumb-sm {
  padding-left: 6px;
  padding-right: 6px;
}
.header-time {
  width: 200px;
  padding: 14px;
  line-height: 32px;
  color: $color_silver_approx;
  position: absolute;
  left: 50%;
  margin-left: -100px;
  top: 0;
  text-align: center;
  font-size: 12px;
}
.header-action {
  float: right;
  padding-right: 16px;
  display: flex;
  align-items: center;
}
.header-action-btn {
  padding: 14px 24px;
  float: left;
}
.header-action-item {
  padding: 14px 0;
  margin-left: 8px;
  float: left;
  line-height: 32px;
  .larkicon-more {
    display: block;
    width: 42px;
    height: 32px;
    line-height: 32px;
    font-size: 18px;
    cursor: pointer;
  }
  > .larkicon {
    display: block;
    margin-right: 8px;
    color: $color_chicago_approx;
  }
  > a:not(.ant-btn) {
    color: $color_chicago_approx;
  }
}
.header-action-item-text {
  padding-left: 16px;
  padding-right: 16px;
}
.header-action-link {
  float: left;
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 14px;
  color: $color_chicago_approx;
  padding: 14px 20px;
  line-height: 32px;
  border-left: 1px solid $color_gray_nurse_approx;
}
.header-action-link-active {
  color: $color_chateau_green_approx;
  background: $alabaster;
}
.header-action-area {
  margin: 20px 0;
  padding: 0 20px;
  border-left: 1px solid $color_gray_nurse_approx;
  float: left;
  height: 10px;
  cursor: pointer;
  em {
    margin-right: 10px;
    font-style: normal;
  }
  .comment-icon {
    position: relative;
    display: block;
    margin-top: -3px;
    .larkicon-comments {
      font-size: 17px;
    }
    .larkicon-check-o {
      position: absolute;
      right: -5px;
      bottom: 0;
      //Instead of the line below you could use @include transform($scale, $rotate, $transx, $transy, $skewx, $skewy, $originx, $originy)
      transform: scale(0.8);
      color: $color_mountain_mist_approx;
      background: $white;
    }
    &.active .larkicon-check-o {
      color: $color_chateau_green_approx;
    }
  }
  &.more-menu .larkicon-more {
    font-size: 18px;
    position: relative;
    top: -4px;
  }
}
.header-action-like {
  float: left;
}
@media screen and(max-width: 991px) {
  .header {
    .logo {
      margin-right: 20px;
    }
    .header-search {
      display: none;
    }
    .header-nav-menu {
      width: calc(100% - 260px);
    }
  }
}
@media screen and(max-width: 767px) {
  .header {
    .header-nav-menu {
      display: none;
    }
    .header-nav.header-nav-left {
      display: none;
    }
  }
}
.header-nav-item-active:before {
  content: " ";
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  height: 3px;
  width: 100%;
  background-color: $color_christi_approx;
}
.header-nav-item-text a {
  padding: 0 10px;
  &:after {
    content: " ";
    border-top: 2px solid rgba(0, 0, 0, 0);
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    display: block;
    //Instead of the line below you could use @include transition($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10)
    transition: all 0.3s ease;
  }
  &.active:after {
    border-top-color: $color_chateau_green_approx;
  }
}

// header
.navbar-nav {
  a {
    color: $txtColor;
    &:hover {
      color: $color_christi_approx;
    }
  }
  .active {
	color: $blackColor;
	font-weight:bold;
  }
}
